#pragma once


namespace my_stack
{
	template<class T, class Container = deque<T>>
	class Stack
	{
	public:
		void push(const T& val)
		{
			_sta.push_back(val);
		}

		void pop()
		{
			_sta.pop_back();
		}

		T& top()
		{
			return _sta.back();
		}

		const T& top()  const
		{
			return _sta.back();
		}

		const size_t size() const
		{
			return _sta.size();
		}

		bool empty()
		{
			return _sta.empty();
		}

	private:
		Container _sta; //在默认生成的构造函数里初始化
	};


}